"use scrict";
//Модальное окно
// Проверка, является ли браузер IE
let isIe = function(){
    return navigator.userAgent.search(/Trident/) > 0
}
let modalCall = document.querySelector(".modal-call");
let modalCloseBtn = document.querySelector(".close-cross");
let modalWindow = document.querySelector(".modal-window");
let blur = document.querySelector(".blur");

//Вызов окна
modalCall.onclick = function(){
    modalWindow.style.transition = "all 1s ease";
    document.body.style.overflow = "hidden";
    blur.style.transition = "all 1s ease";
    if(isIe){
        blur.style.opacity = "0.2";
    }else{
        blur.style.filter = "blur(3px)";
    }
    modalWindow.style.top = "0";
}

modalCloseBtn.onclick = function(){
    modalWindow.style.top = "2600px";
    if(isIe){
        blur.style.opacity = "1";
    }else{
        blur.style.filter = "";
    }
    document.body.style.overflow = "scroll";
    modalWindow.style.transition = "all 2s ease";
}

